package org.josircd.config.bean;

import javax.xml.bind.annotation.*;
import java.util.List;

/**
 * org.josircd.config.bean
 *
 * @author richardju
 * @version 1.0
 */
@XmlRootElement(name = "josircd")
@XmlAccessorType(XmlAccessType.FIELD)
public class IrcdConfiguration {
    @XmlElement
    private String name;
    @XmlElement
    private String description;
    @XmlElement
    private int maxClients;
    @XmlElement(name = "listen")
    @XmlElementWrapper(name = "listens")
    private List<IrcdSocket> sockets;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescrition(String description) {
        this.description = description;
    }

    public int getMaxClients() {
        return maxClients;
    }

    public void setMaxClients(int maxClients) {
        this.maxClients = maxClients;
    }

    public List<IrcdSocket> getSockets() {
        return sockets;
    }

    public void setSockets(List<IrcdSocket> sockets) {
        this.sockets = sockets;
    }

    @Override
    public String toString() {
        return name + " / " + description;
    }
}
